import java.util.*;

public class Poker {
    public static void main(String[] args) {
        String[] color = {"♠","♥","♣","♦"};
        List<String> card = new ArrayList<>();
        //生成牌
        for (int i = 0; i < color.length; i++) {
            for (int j = 1; j < 14; j++) {
                card.add(color[i]+" "+j);
            }
        }
        card.add("大王");
        card.add("小王");
        //洗牌
        Random random = new Random();
        for (int i = card.size()-1; i > 0; i--) {
            int index = random.nextInt(i);
            String tmp = card.get(index);
            card.set(index,card.get(i));
            card.set(i,tmp);
        }
        //玩家
        List<String> play1 = new ArrayList<>();
        List<String> play2 = new ArrayList<>();
        List<String> play3 = new ArrayList<>();
        List<List<String>> list = new ArrayList<>();
        list.add(play1);
        list.add(play2);
        list.add(play3);
        //发牌
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 17; j++) {
                list.get(i).add(card.get(0));
                card.remove(0);
            }
        }
        System.out.println(play1);
        System.out.println(play2);
        System.out.println(play3);
        System.out.println(card);
    }
}
